﻿ @using Course.Models
@{
    ViewBag.Title = "DownloadAdd";
}
<html>
<head>
    <title>后台</title>
</head>
<body>
    <div id="body-wrapper">
        @RenderPage("../Shared/BackLeft.cshtml")
        <form action="DownloadAdd" method="post" enctype="multipart/form-data">
        <div id="main-content">
            <!-- Main Content Section with everything -->
            <noscript>
                <!-- Show a notification if the user has disabled javascript -->
                <div class="notification error png_bg">
                    <div>
                        Javascript is disabled or is not supported by your browser. Please <a href="http://browsehappy.com/"
                            title="Upgrade to a better browser">upgrade</a> your browser or <a href="http://www.google.com/support/bin/answer.py?answer=23852"
                                title="Enable Javascript in your browser">enable</a> Javascript to navigate
                        the interface properly. Download From <a href="http://www.exet.tk">exet.tk</a></div>
                </div>
            </noscript>
            <div class="content-box">
                <!-- Start Content Box -->
                <div class="content-box-header">
                    <h3>
                        下载</h3>
                    @*  <ul class="content-box-tabs">
                        <li><a href="#tab1" class="default-tab">分类</a></li>
                        <!-- href must be unique and match the id of target div -->
                        <li><a href="#tab2">Forms</a></li>
                    </ul>*@
                    <div class="clear">
                    </div>
                </div>
                <!-- End .content-box-header -->
                <div class="content-box-content">
                    <div class="tab-content default-tab" id="tab1">
                        <!-- This is the target div. id must match the href of this div's tab -->
                        <div class="notification attention png_bg">
                            <a href="#" class="close">
                                <img src="@Url.Content("~/Content/Images/icons/cross_grey_small.png")" title="Close this notification" alt="close" /></a>
                            <div>
                                添加内容时注意格式
                            </div>
                        </div>
                        @Html.Label("文件名")
                        <input type="text" name="Name" />
                        @Html.Label("顺序")
                        <input type="text" name="OrderNum" />
                        @Html.Label("分类")
                          @{
        List<SelectListItem> items = new List<SelectListItem>();
        IQueryable<Category> categories = ViewData["categories"] as IQueryable<Category>;

        int i = 0;
        foreach (var category in categories)
        {
            SelectListItem item = new SelectListItem();
            item.Text = category.CName;
            item.Value = category.CategoryID.ToString();

            if (i == 0)
            {
                item.Selected = true;
                i++;
            }
            items.Add(item);
        }
        }
        @Html.DropDownList("ddlCate", items);
                        @Html.Label("上传")
                        <input type="file" name="fileData" />
                        <input type="submit" value="确定" />
                    </div>
                    <!-- End #tab1 -->
                </div>
                <!-- End .content-box-content -->
            </div>
        </div>
        </form>
    </div>
</body>
</html>
